#if !defined(_CAUSERDATA_H_)
#define _CAUSERDATA_H_

#include "AObject.h"
#include "ASettings.h"

class CAUserData : public CASettings, public CAValueChangedListener
{
protected:
	//CASettings _settings;
	bool _bAutoSave;
	void onValueChanged(CAValueObject* pv);

	void _load();
	void _save();

	static CAUserData* sm_pSharedUserData;
public:
	CAUserData();
	virtual ~CAUserData(void);
	
	void setAutoSave(bool bas = false) { _bAutoSave = bas; }

	static CAUserData& sharedUserData() 
	{ 
		return *sm_pSharedUserData; //->_settings; 
	}
};

#endif //_CAUSERDATA_H_